I was having the same issue after upgrading to 3.5. In addition to not being able to add media using the add media button on a post/page, the edit permalink feature wasn’t working either. In my case the offending plugin was Cart66 Lite. After deactivating Cart66 Lite, the add media and update permalink buttons work.