configure: Add --with-assertions option and only enable assertions when it is used