xhr calls fail in cordova (ios) when a relative url is used - Fixes #354