Clang undef fix

I think I originally wrote this bug and then you copied it @girving.  Here is a quick fix.  Thanks!  Should be merged after #121.