fix(utils): add dummy method when window object does not exist