How to detect qubit-environment entanglement generated during qubit dephasing