Only use -Wlogical-op with GCC 4.6 and later

It generates an apparently spurious warning with gcc 4.4 in debian;
we haven't tested 4.5.