Stringify objects with methods (from jsconsole.com)