Fixed compilation and ARC issues when compiling with XCode5.