US judge rules against corporate contribution ban