fixed use of Object.keys() when not defined (fixed #25)