Clarify error, switch to ECMAScript 5's Object.keys

Signed-off-by: Eli Skeggs <skeggse@gmail.com>