Backported URL param and Facebook fix to PhoneGap 2.x branch