Fix error where strToObj is undefined when it is used

Can't get this module to run on node 0.10. This fixes that.