build: fix the debug parameter to properly handle --disable-debug
Right now the the enableval isn't checked, so the debug options are added for --enable-debug and --disable-debug, which is quite surprising for a user. Fix this to properly handle the disable case.