Bernie Sanders has won the West Virginia primary in the Democratic race for the presidential nomination, US media project.