clang fixes and bug fixes for ELEMENT_ARRAY_BUFFER