Apply fix from https://github.com/katzer/cordova-plugin-background-mode/issues/419#issuecomment-473851949