libc: add NASTY PTHREAD HACK on ICS

this was deprecated in ICS but seems useful for old proprietary libraries

Change-Id: I5622774ca9051ed6867372cee89b1f6e0f991b08