Buckling of elastic loops spanned by soap film