Something like the following should have the desired effect (this is butchered code from one of my themes - I've not tested it in this form):
<?php foreach ( $pages as $page ) : ?>
<li class="menu-item <?php echo ( isset( $post ) && $page->id == $post->id ) ? 'current-menu-item' : '' ?>"><a href="<?php echo $page->permalink; ?>"><?php echo $page->title; ?></a></li>
<?php endforeach; ?>
---
$pages is defined in my theme.php as follows:
---
public function add_template_vars()
{
if ( !$this->template_engine->assigned( 'pages' ) ) {
$this->assign('pages', Posts::get( 'page_list' ) );
}
[... the rest of the function's contents here ... ]
}
---
HTH
Colin