Add API for Firefox 30+.
Apply new API.
Merge branch 'fix-firefox-30'