Compatibility fixes for Greasemonkey v2.

- add `@grant`
- export function which is referred from page context
Merge pull request #3 from azu/master

Compatibility fixes for Greasemonkey v2.