A polyfill for Mozilla's Object.toSource() method.