Fixed javascript callbacks, which were broken on Xcode6.