Use attribute locations instead of hard coded indixes

Found this while working on the extension implementation for Firefox. The test would fail on Windows because ANGLE didn't appear to overwrite the hardcoded index 0. This passes on Chrome stable for OS X; I'll do additional testing with Chrome and Firefox on other platforms.