Standard model with compactified spatial dimensions