backport android version check fixes from @monkut. Closes #137. Closes #143