fix issues around plugin activation by setting $GLOBALS['pagenow'] to
the expected value

closes #917
Merge pull request #917 from wp-cli/pagenow

Error activating JetPack