Detection of libraries built as framework or dylib on Mac

This makes build system detect if Qt libraries are built as framework or not and
add correct flags to LIBS.

Change-Id: Ifb0d2ed87f5d624966395bce39959ce53f1dee89
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Make imap compress with zlib enabled on Mac.

This fix make imap compress with zlib enabled on Mac.

Change-Id: I7dd65b1249b77532796b036644f76b4235dd81c9
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>