Dephasing of Majorana-based qubits