Added optimization flags to unit tests compilation for faster running.