configure: Don't build redundant gd modules