[build] Allow using --enable-shared and --enable-debug in ./configure