move building of define list for modes to separate function
re-use mode programs instead of replacing every time
(drop support for URL-based shader references for now, may bring back later)