Effect of Mg2+ ions on energy generation by Reverse Electrodialysis