PhantomJS: Made compliant with --noImplicitAny and added more details to many of the declarations.