libc: add escaping for "$"

under certain circumstances the if statement can break resulting in a build error "bionic/libc/Android.mk:696: *** extraneous `endif'. Stop."