Support building with GCC 4.9.
Bug fix: delete vs. delete[].