Jeremy Corbyn says he will adopt a "neutral stance" in any Brexit referendum carried out under a Labour government.