You should save the entire array, not just the first element:
realMozMobileConnections = navigator.mozMobileConnections