Fixes to make photobrowser work on iOS7

These are several fixes made by my colleague to make photobrowser work in an app we are upgrading to iOS7.