use correct bufferData method when passing a NULL pointer
Merge pull request #2051 from inolen/invalidate_buffer_support

use correct bufferData method when passing a NULL pointer