work around gcc 4.8's generation of self-referential mem* functions at -O3