Fixed by commit https://github.com/richtr/deviceorientation/commit/a110c0881d455de0d418080ae19d1b7614141529.