[COOK-4296] Pass custom build flags before compiling from source

https://tickets.opscode.com/browse/COOK-4296