Convert empty sample app to static lib.
Fix the missing libz link in the new targets.