BLD: Made build extensions more flexible