Fix room autopruning

The `length` property accessed on the room object's keys, instead of trying to access a `length` property on the object.
I imagine he incorrectly assumed we were going to run this on the browser. No tradeoff in performance though.