fix makefile templates for nrf51822 targets