Extensions of mod p principal series and Galois representations