More robust fix - checking that swfobject is not undefined

Sorry, my fault: previous fix still throws errors in some scenarios, this doesn't.