use a prototype instead of creating new functions for every instance

a little more memory effecient and engines like V8 and SpiderMonkey can
optimize for your new type easier if they can share functions on the
prototype.