Use __proto__ if available

Solves #127 and replaces #128.