Import https://github.com/kuahyeow/ghostdriver/commit/ba866de0a064eb74d211e30cdee458d7d11b1ea6