Android: Fix JS dialogs for Android prior v.4