Revert "Jon remove function constructor"

Reverts adamvr/MQTT.js#218