Give the constructor function a name so that created objects also have a name

I've always been annoyed that when debugging my code, my objects are all named something like `b.(anonymous function)`. This change solves this problem.

I got the implementation idea from http://marcosc.com/2012/03/dynamic-function-names-in-javascript/