Britain is extending the voter registration period for its referendum on European Union membership after a government website crashed just hours before the deadline.