Included cmath in common.hpp to avoid isnan complaints from the xcode co...

...mpiler
I might be missing something here, but I assume that protobuf's has_*() function already returns bool...?