Re-fix compiler warnings with scanner.cpp

The existing check for -Wno-deprecated-register worked with a pre-3.4
clang SVN release, but the release 3.4 compiler only has
-Wno-deprecated. Not sure if any compiler does or will support
-Wno-deprecated-register but even if it's wasted, it's not doing any
harm.

Change-Id: I274255415b66b889dc155472c5f81b6073cdce3e