Update proto.js

Added improvement suggested by Bergi on http://stackoverflow.com/questions/22382899/robust-prototype-access