Optimized the EventListener onMessage() method

Thanks to @Tuurbo here: https://github.com/BrainBoxLabs/brain-socket/issues/6