Turning the 'resource curse' into a blessing for education