making conditional optimization for loci module

Do not enable -Os optimization when DEBUG is set.