Updated for compatibility with 2.1 - 2.5

https://github.com/their/pg-plugin-screen-orientation/pull/5