Don't iterate over prototype's keys in .mapObject

This is also related to the performance regression noticed in atom/atom#4666.