Fixed Mosquitto support.

It should resolve #5 and support Mosquitto and ActiveMQ.
@andypiper @ragingwind can you test it?

NPM is down so I will not release it today.

Closes #5.