Fix method usage to compile under iOS7