Make extension check case insensitive

Fixes issue 1467.