Update build-kernel.sh

Detect at runtime the number of cpu cores (with hyperthreading)