Move ifdef under function brackets. This fixes compile crach when IRQ priorities are disabled. Signed-off-by: Darius Augulis <augulis.darius@gmail.com>