Add support for NULLPTR_TYPE, which can occur when compiling C++11 code.  Based
on a patch by Leo Yuriev.  This fixes PR14777.