Prototype for createSpyObj to allow for typed spies

Added an overload to the prototype for createSpyObj to allow it to return a strongly typed spy object via use of generics