build: module: Add dynamic option compiling

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>