Fix unitests on API <20 (#4624)
Fix unitests on API <20 (#4624)

* Fix unitests on API <20

* Fix tests for API >19.
Previous commit breaks them

NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript