Fixing _FORTIFY_SOURCE error when compile on Arch Linux

Fixing _FORTIFY_SOURCE with adding MACRO_TUNE_COMPILER(-O2) on CMAKELists.txt 
and change _BSD_SOURCE to _DEFAULT_SOURCE on smsd/services/sql.c and smsd/services/pgsql.c