workaround weird 10.8 bug; minor build fixes; SL improvemnts

in 10.8 a this-can't-happening was plaguing bigrams; "fixed" by moving
to gcc4.7 and/or removing unnecessary libs from build

build fixes reduce spurious warnings

SL includes new base routines implementation using the C version of the
db