Computing Karhunen-Loeve eigenmodes on irregular domains