ios: Fix socket.read() not respecting maxLength