Use LOCAL_WHOLE_STATIC_LIBRARIES to avoid code removal and
add LOCAL_LDLIBS

Change-Id: I89708f01e45adeba0b7ad17f3008cbb521645f01