Fixed #1222: Update PhantomJS globals to 1.7 API

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>