Upgrade for React 0.12 compatibility

Test Plan: I have no idea how to test this.