Allow detecting extension

@martijnrusschen review?